home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Source Code ƒ / Misc. C ƒ / Recorder / Recorder.a < prev    next >
Encoding:
Text File  |  1990-06-14  |  1.5 KB  |  67 lines  |  [TEXT/MPS ]

  1.     BLANKS  ON
  2.     STRING  ASIS
  3.     CASE    OFF
  4.     
  5.     INCLUDE    'Traps.a'
  6.  
  7.     IMPORT    READCOMPLETION1:CODE
  8.     IMPORT    READCOMPLETION2:CODE
  9.     IMPORT    WRITECOMPLETION1:CODE
  10.     IMPORT    WRITECOMPLETION2:CODE
  11.     
  12. SetupGlob    PROC    EXPORT
  13.     EXPORT    globals:CODE
  14.  
  15.     lea    globals(pc), A0
  16.     move.l    A5, (A0)
  17.     rts
  18. globals:
  19.     DC.L    0    ; pointer to our globals goes here!
  20.     ENDP
  21.     
  22. ReadCompletionGlue1    PROC    EXPORT
  23.     move.l    a5, -(a7)        ; save A5
  24.     move.l    globals(pc), a5        ; set up our A5
  25.     move.l    8(a7), -(a7)        ; get the param
  26.     bsr    READCOMPLETION1        ; call the routine
  27.     move.l    (a7)+, a5        ; restore A5
  28.     move.l    (a7)+, a0        ; get return addr
  29.     addq    #4, a7            ; pop parameter
  30.     jmp        (a0)        ; and return
  31.     ENDP
  32.  
  33. ReadCompletionGlue2    PROC    EXPORT
  34.     move.l    a5, -(a7)        ; save A5
  35.     move.l    globals(pc), a5        ; set up our A5
  36.     move.l    8(a7), -(a7)        ; get the param
  37.     bsr    READCOMPLETION2        ; call the routine
  38.     move.l    (a7)+, a5        ; restore A5
  39.     move.l    (a7)+, a0        ; get return addr
  40.     addq    #4, a7            ; pop parameter
  41.     jmp        (a0)        ; and return
  42.     ENDP
  43.  
  44. WriteCompletionGlue1    PROC    EXPORT
  45.     move.l    a5, -(a7)        ; save A5
  46.     move.l    globals(pc), a5        ; set up our A5
  47.     move.l    8(a7), -(a7)        ; get the param
  48.     bsr    WRITECOMPLETION1    ; call the routine
  49.     move.l    (a7)+, a5        ; restore A5
  50.     move.l    (a7)+, a0        ; get return addr
  51.     addq    #4, a7            ; pop parameter
  52.     jmp        (a0)        ; and return
  53.     ENDP
  54.  
  55. WriteCompletionGlue2    PROC    EXPORT
  56.     move.l    a5, -(a7)        ; save A5
  57.     move.l    globals(pc), a5        ; set up our A5
  58.     move.l    8(a7), -(a7)        ; get the param
  59.     bsr    WRITECOMPLETION2    ; call the routine
  60.     move.l    (a7)+, a5        ; restore A5
  61.     move.l    (a7)+, a0        ; get return addr
  62.     addq    #4, a7            ; pop parameter
  63.     jmp        (a0)        ; and return
  64.     ENDP
  65.  
  66.     END
  67.